<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 联系人</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="__PUBLIC__/admin/favicon.ico">
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/animate.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/laydate/laydate.css" rel="stylesheet">
    <style>
        body{padding: 20px;}
        .demo-input{padding-left: 10px; height: 38px; min-width: 262px; line-height: 38px; border: 1px solid #e6e6e6;  background-color: #fff;  border-radius: 2px;}

    </style>
</head>
<include file="Admin@Index:cache" />
<body class="gray-bg contacts" oncopy="copyval()">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox">
                    <div class="ibox-content">
                        <h5>用户列表-
                            <small>未通过用户</small>
                        </h5>
                        <div class="col-sm-12" style="margin-bottom: 1rem">
                            <form role="form" id="my_form" action="__MODULE__/User/user_list_nopass" method="get">
                                <div class="form-group">
                                    <input type="text" id="content" placeholder="" name="key" class="form-control" value="<{$search.key}>">
                                </div>
                                <div>

                                    <label>申请时间</label>
                                    <input style="height: 2.5rem;padding: 3px" type="text" class="demo-input" placeholder="选择时间" id="application_time" name="application_time" value="<{$search.application_time}>">
                                    <label style="margin-left: 10px">审核时间</label>
                                    <input style="height: 2.5rem;padding: 3px" type="text" class="demo-input"  placeholder="选择时间" id="cert_time" name="cert_time" value="<{$search.cert_time}>">

                                    <select class="form-control m-b" name="channel" id="select_channel" style="margin: 0px 10px 0px 10px;padding-top: 3px;display: inline;width: 11%;" >
                                        <option value="">渠道商</option>
                                        <!--<option value="0">自增</option>-->
                                        <volist name="channel" id="vo">
                                            <option value="<{$vo.chan_id}>" ><{$vo.channel_name}></option>
                                        </volist>
                                    </select>

                                    <span>每页显示</span>
                                    <select onchange="submit_form()" class="form-control m-b" name="show_num"  id="show_num" style="margin-bottom: 0;padding-top: 3px;display: inline;width: 11%;" >
                                        <option value="10">10</option>
                                        <option value="20">20</option>
                                        <option value="50">50</option>
                                        <option value="100">100</option>
                                    </select>
                                    <span>条</span>
                                    <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit" id="search"><strong>搜索</strong>
                                    </button>
                                </div>
                            </form>
                        </div>
                        <br>
                        <div class="ibox-content">
                            <table class="table table-striped table-bordered table-hover" id="sample-table">
                                <tbody>
                                <tr>
                                    <th>用户手机号</th>
                                    <th>用户姓名</th>
                                    <th>审核类型</th>
                                    <th>审核人</th>
                                    <th>审核时间</th>
                                    <th>申请时间</th>
                                    <th>渠道</th>
                                    <th>操作</th>
                                </tr>
                                <volist name="data" id="vo">
                                    <tr>
                                        <td><{$vo.mobile}></td>
                                        <td><{$vo.username}></td>
                                        <td><{$vo.check_type}></td>
                                        <td><{$vo.approver}></td>
                                        <td><{$vo.approve_time}></td>
                                        <td><{$vo.commit_time}></td>
                                        <td><{$vo.channel_name}></td>
                                        <td id="th_<{$vs.id}>">
                                            <a target="_blank" class="btn btn-success btn-rounded"
                                               href="javascript:;" onclick="into_detail('<{$vo.id}>')"
                                               title="详情">详情</a>
                                                    <a class="btn btn-info btn-rounded"
                                                       href="javascript:;" title="返回审核" onclick="back_check('<{$vo.user_id}>','<{$vo.mobile}>')"
                                                       target="_blank">返回审核</a>


                                        </td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </div>
                        <ul class="pagination">
                                <{$fpage}>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>

<!-- 自定义js -->
<script src="__PUBLIC__/admin/js/content.js?v=1.0.0"></script>
<script src="__PUBLIC__/admin/js/laydate/laydate.js"></script>
<script src="__PUBLIC__/admin/js/layer/layer.js"></script>
<script src="__PUBLIC__/admin/js/layui/layui.js"></script>
<script>

    function submit_form() {
        var form = document.getElementById('my_form');
        form.submit();
    }
    //select赋值
    var option2="<{$search.show_num}>";
    $('#show_num').val(option2);
    //select赋值
    var option="<{$search.channel}>";
    $('#select_channel').val(option);

    //返回审核
    function back_check(id,mobile) {
        var   title ='将手机号码为：'+mobile+"的用户重新审核?"
        console.log('222',id);
        layer.confirm(title, function (index) {
            layer.close(index);
            $.post('__MODULE__/User/back_check', {
                    id: id
                },
                function (data) {
                    if (data.code == '1001') {
//                        var tr_id='#'+id;
//                        var bt_id='#'+mobile;
//                        var val=data.b_status;
//                        var bt_val=data.button_status;
//                        $(tr_id).html(val);
//                        $(bt_id).html(bt_val);
                        layer.msg(data.result, {icon: 6, time: 1000});
                        window.location.reload();
                    } else if (data.code == '1002') {
                        layer.msg(data.result, {icon: 5, time: 1000});
                    }
                }, 'json');

        });

    }

    //用户详情
    function into_detail(id) {
        window.location.href='__MODULE__/User/user_detail?u_id='+id;
    }

    function copyval() {
        var content ='【未通过用户】列表复制：'+ window.getSelection().toString();
        $.post('__MODULE__/Mypublic/copy_all', {content:content}, function (data) {
            if (data.code == '1001') {
            } else {
                console.log(data);
            }
        });
    }
    //日期时间范围
    laydate.render({
        elem: '#application_time'
        ,type: 'datetime'
        ,range: true
    });
    //日期时间范围
    laydate.render({
        elem: '#cert_time'
        ,type: 'datetime'
        ,range: true
    });


    $(document).ready(function () {
        $('.fancybox').fancybox({
            openEffect: 'none',
            closeEffect: 'none'
        });
    });

</script>


</body>

</html>
